﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterAdmin.master" AutoEventWireup="true" CodeFile="ThemMonHoc.aspx.cs" Inherits="Admin_ThemMonHoc" Title="Untitled Page" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="ajt" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajt1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <ajt:ScriptManager runat="server" ID="script1">
    </ajt:ScriptManager>
    <ajt:UpdatePanel ID="UpdatePanel1" runat="server">
                  <ContentTemplate>
    
    <br />
    <strong><span style="font-size: 16pt; font-color:Green"><span style="color: #000099">
        THÊM MÔN HỌC</span><br />
    </span></strong>
    <br />
    
    <table border="0" style="width: 500px; text-align: center">
        <tr>
            <td style="width: 144px; height: 29px; text-align: left">
                Mã môn học</td>
            <td align="left" style="width: 261px; height: 29px">
                <asp:TextBox ID="txtMaMonHoc" runat="server" Width="254px"></asp:TextBox>&nbsp;
                <asp:Label ID="Label1" runat="server" BackColor="White" ForeColor="Red" Text="Mã môn học này đã tồn tại"
                    Visible="False" Width="167px"></asp:Label></td>
        </tr>
        <tr>
            <td style="width: 144px; height: 32px; text-align: left">
                Tên môn học:</td>
            <td align="left" style="width: 261px; height: 32px">
                <asp:TextBox ID="txtTenMonHoc" runat="server" Width="254px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width: 144px; height: 29px; text-align: left">
                Loại môn học</td>
            <td align="left" style="width: 261px; height: 29px">
                <asp:ListBox ID="lbLoaiMon" runat="server" Height="20px" Width="260px" Rows="1"></asp:ListBox></td>
        </tr>
        <tr>
            <td style="width: 144px; height: 29px; text-align: left">
                Số Tín Chỉ</td>
            <td align="left" style="width: 261px; height: 29px">
                <asp:TextBox ID="txtSoTinChi" runat="server" Width="254px" MaxLength="2"></asp:TextBox>
                <asp:Label ID="lbSoTinChi" runat="server" BackColor="White" ForeColor="Red" Text="Số tín chỉ phải là số"
                    Visible="False" Width="125px"></asp:Label></td>
        </tr>
        <tr>
            <td style="width: 144px; height: 28px; text-align: left">
                Bộ Môn</td>
            <td align="left" style="width: 261px; height: 28px">
                <asp:ListBox ID="lbBoMon" runat="server" Height="20px" Width="260px" Rows="1"></asp:ListBox></td>
        </tr>
        <tr>
            <td style="width: 144px; height: 26px; text-align: left">
                Đề Cương</td>
            <td align="left" style="width: 392px; height: 28px">
                <asp:FileUpload ID="upLoadFile" runat="server" Width="474px" Height="31px" /></td>
        </tr>
        <tr>
            <td style="width: 144px; height: 26px; text-align: left">
                </td>
            <td align="left" style="width: 392px; height: 28px">
            </td>
        </tr>
        <tr>
            <td colspan="2" style="height: 26px; text-align: left" align="center">
                <fieldset id="FIELDSET1"  >
		<legend>
                Chọn môn học tiên quyết</legend>
                    
		            <table style="width: 307px">
                        <tr>
                            <td align="center" colspan="2" style="width: 718px">
                                <asp:Label ID="Label3" runat="server" BackColor="Red" BorderStyle="Groove" Text="Không Tồn Tại Môn Học Nào !"
                                    Visible="False" Width="370px" Font-Size="20pt"></asp:Label></td>
                        </tr>
                        <tr>
                        
                        <td colspan="2" style="width: 718px">
                        
		                <asp:GridView ID="gridMonHoc"  runat="server" Width="572px" BackColor="White"
		                                BorderStyle="Solid" AutoGenerateColumns="False" AllowSorting="True" 
		                                BorderWidth="1px" GridLines="Vertical" ForeColor="Black" CellPadding="3" 
		                                datakeynames="maMonHoc"
		                                CellSpacing="5"
		                                BorderColor="#999999" >
                		 
                         <FooterStyle BackColor="#CCCCCC"></FooterStyle> 
                         
                         <columns>
                            <asp:templatefield headertext="M&#227; MH">
                                <itemtemplate>
                                  <asp:label id="lbMaMonHoc" runat="server" Text= '<%# Bind("MaMonHoc")%>'></asp:label>
                                </itemtemplate>
                                <ItemStyle BorderColor="DarkBlue" Font-Bold="True" Font-Italic="True" Width="50px" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:templatefield>  
                            
                            <asp:templatefield headertext="T&#234;n m&#244;n học">
                                <itemtemplate>
                                  <asp:LinkButton id="lbTenMonHoc" runat="server" Text= '<%# Bind("TenMon")%>' 
                                  CommandArgument='<%# Bind("MaMonHoc")%>' CommandName="xemChiTiet" 
                                  OnClick="xemChiTietMonHoc" ToolTip="Xem chi tiết">
                                  </asp:LinkButton>
                                </itemtemplate>
                               <ItemStyle BorderColor="DarkBlue" Font-Bold="True" Font-Italic="True"  />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:templatefield>    
                             
                          <asp:templatefield headertext="STC">
                                <itemtemplate>
                                  <asp:label id="lbSoTinChi"  runat="server" Text= ' <%# Bind("SoTinChi")%>' ></asp:label>
                                </itemtemplate>
                                <ItemStyle BorderColor="DarkBlue" Font-Bold="True" Font-Italic="True" Width="40px" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                          </asp:templatefield> 
                          <asp:TemplateField HeaderText="Chọn">
                                <ItemTemplate>
                                
                                    <asp:CheckBox id="cbChonTQ" Checked="false" Visible="true" runat="server"  />
                                </ItemTemplate>
                               <ItemStyle BorderColor="DarkBlue" Font-Bold="True" Font-Italic="True" Width="40px" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                          </asp:TemplateField>
                                                                                                              
                        </columns>     
                        <PagerStyle HorizontalAlign="Center" BackColor="#999999" ForeColor="Black"></PagerStyle>

                        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White"></SelectedRowStyle>
                        <HeaderStyle BackColor="BlueViolet" Font-Bold="True" ForeColor="White"></HeaderStyle>
                        <AlternatingRowStyle BackColor="#CCCCCC"></AlternatingRowStyle>
                        
                    </asp:GridView>
                     
                            </td>
                            
                        </tr>
                    </table>
                </fieldset>
               
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2" style="height: 26px; text-align: left">
            <fieldset id="fsMonTienQuyet"  runat="server" visible="false">
		        <legend>Môn học tiên quyết được chọn: </legend>
		        <asp:GridView ID="gridMonTienQuyet"  runat="server" Width="572px" BackColor="White"
		                                BorderStyle="Solid" AutoGenerateColumns="False" AllowSorting="True" 
		                                BorderWidth="1px" GridLines="Vertical" ForeColor="Black" CellPadding="3" 
		                                datakeynames="maMonHoc"
		                                CellSpacing="5"
		                                BorderColor="#999999"	  
		                                 >
                		 
                         <FooterStyle BackColor="#CCCCCC"></FooterStyle> 
                         <columns>
                            <asp:templatefield headertext="M&#227; MH">
                                <itemtemplate>
                                  <asp:label id="lbMaMonHoc" runat="server" Text= '<%# Bind("MaMonHoc")%>'></asp:label>
                                </itemtemplate>
                                <ItemStyle BorderColor="DarkBlue" Font-Bold="True" Font-Italic="True" Width="50px" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:templatefield>  
                            
                            <asp:templatefield headertext="T&#234;n m&#244;n học">
                                <itemtemplate>
                                  <asp:LinkButton id="lbTenMonHoc" runat="server" Text= '<%# Bind("TenMon")%>' 
                                                    CommandArgument='<%# Bind("MaMonHoc")%>' CommandName="xemChiTiet" 
                                                    OnClick="xemChiTietMonHoc" ToolTip="Xem chi tiết">
                                  </asp:LinkButton>
                                </itemtemplate>
                                <ItemStyle BorderColor="DarkBlue" Font-Bold="True" Font-Italic="True" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:templatefield>    
                             
                          <asp:templatefield headertext="STC">
                                <itemtemplate>
                                  <asp:label id="lbSTC"  runat="server" Text= ' <%# Bind("SoTinChi")%>' ></asp:label>
                                </itemtemplate>
                                <ItemStyle BorderColor="Navy" HorizontalAlign="Center" VerticalAlign="Middle" Width="40px" />
                              <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                          </asp:templatefield>                                                                                                               
                        </columns>     
                        <PagerStyle HorizontalAlign="Center" BackColor="#999999" ForeColor="Black"></PagerStyle>

                        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White"></SelectedRowStyle>
                        <HeaderStyle BackColor="BlueViolet" Font-Bold="True" ForeColor="White"></HeaderStyle>
                        <AlternatingRowStyle BackColor="#CCCCCC"></AlternatingRowStyle>
                        
                    </asp:GridView>
            </fieldset>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2" style="height: 9px; text-align: center" valign="top">
                <asp:Label ID="Label2" runat="server" Text="Lỗi insert"
                    Width="283px" BackColor="Red" Font-Size="14pt" Visible="False"></asp:Label>
                &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            </td>
            
        </tr>
        <tr>
            <td align="left" colspan="2" style="height: 26px; text-align: center" valign="middle">
                <asp:Button ID="btnThem" runat="server" Text="Thêm" Width="77px" OnClick="btnThem_Click" /></td>
        </tr>
    </table>
   </ContentTemplate>
               </ajt:UpdatePanel>


</asp:Content>

